import request from '@/config/axios'

export interface MemberPrivilegeVO {
  id: number
  levelId: number
  privilegeName: string
  privilegeNum: string
  status: number
}

// 查询相亲会员等级特权列表
export const getMemberPrivilegePage = async (params) => {
  return await request.get({ url: `/blind/member-privilege/page`, params })
}

// 查询相亲会员等级特权详情
export const getMemberPrivilege = async (id: number) => {
  return await request.get({ url: `/blind/member-privilege/get?id=` + id })
}

// 新增相亲会员等级特权
export const createMemberPrivilege = async (data: MemberPrivilegeVO) => {
  return await request.post({ url: `/blind/member-privilege/create`, data })
}

// 修改相亲会员等级特权
export const updateMemberPrivilege = async (data: MemberPrivilegeVO[]) => {
  return await request.put({ url: `/blind/member-privilege/update`, data })
}

// 删除相亲会员等级特权
export const deleteMemberPrivilege = async (id: number) => {
  return await request.delete({ url: `/blind/member-privilege/delete?id=` + id })
}

// 导出相亲会员等级特权 Excel
export const exportMemberPrivilege = async (params) => {
  return await request.download({ url: `/blind/member-privilege/export-excel`, params })
}
